//
//  TheHomeManager.h
//  JiuKuGospel
//
//  Created by jiukuyinyue on 15-8-11.
//  Copyright (c) 2015年 JiuKuForApp. All rights reserved.
//

#import <Foundation/Foundation.h>

#define _TheHomeM ([TheHomeManager shareTheHomeManager])

@class JKSongsMessStatus, PlayViewController, ShengJingMessageViewController, FMDatabase, SearchViewController,AppDelegate;

@interface TheHomeManager : NSObject

@property (nonatomic,copy) NSString *bibleName;//jilu 圣经
@property (nonatomic, assign)NSInteger historyCount;                  //记录圣经的第几章节

@property (nonatomic, assign)NSInteger tempCount;                  //记录圣经的第几章节

@property (nonatomic, strong)AppDelegate * appDelete;

@property (nonatomic, strong)NSString * iPhone23;

@property (nonatomic, strong)UIViewController * nowViewController;  //当前控制器

@property (nonatomic, assign)BOOL isPlaying;

//最下面定位视图的信息
@property (nonatomic, strong)PlayViewController * playVC;
@property (nonatomic, strong)JKSongsMessStatus * status;
@property (nonatomic, strong)NSString * zjNameStr;
@property (nonatomic, assign)CGFloat sliderValue;

//定位圣经
@property (nonatomic, assign)NSInteger shengjPlayBool;
@property (nonatomic, strong)ShengJingMessageViewController * playVCShengj;
@property (nonatomic, assign)CGFloat sliderValueShengj;
@property (nonatomic, strong)NSString * zjNameStrShengj;
@property (nonatomic, strong)NSString * songNameShengj;
@property (nonatomic, strong)UIImage * imageShengj;
@property (nonatomic, strong)NSString * imageShengJUrl;
@property (nonatomic, strong)UITableView * liebiaoTab;

//红色标记
@property (nonatomic, strong)NSString * selectShiGeID;
@property (nonatomic, strong)NSString * songListID;
@property (nonatomic, assign)NSInteger songIndex;

@property (nonatomic, strong)NSMutableDictionary * selectShengjDic;

@property (nonatomic, strong)NSMutableArray * zhufuArr;
@property (nonatomic, strong)NSString * fabuNeiRong;

//缓存
@property (nonatomic, strong)NSMutableDictionary * shengjingAllDic;
@property (nonatomic, strong)NSMutableDictionary * shengjingNumZDic;
@property (nonatomic, strong)NSMutableDictionary * shigeDic;
@property (nonatomic, strong)NSMutableDictionary * lingxiuDic;
@property (nonatomic, strong)NSString * gengXinImageStr;                 //是否更新,删除图片缓存
@property (nonatomic, strong)NSString * genXinHuanCStr;                  //是否更新,删除数据缓存

@property (nonatomic, assign)BOOL musicTempSaveBool;  //控制缓存下载暂停和删除

//声音中断
@property (nonatomic, assign)BOOL phoneSiri;    //
@property (nonatomic, assign)BOOL siri1;
@property (nonatomic, assign)BOOL siri2;
@property (nonatomic, assign)BOOL siri3;
@property (nonatomic, assign)BOOL xuboChongTu;
@property (nonatomic, assign)BOOL backGround;
@property (nonatomic, assign)NSInteger stopTwo;
#pragma mark  ---QQ微信混乱4.7----
@property (nonatomic, assign)BOOL QqWxBool;         //QQ微信播放语音,播放混乱


//睡眠定时的计时器
@property (strong, nonatomic)UILabel * timeLabel;
@property (assign, nonatomic)CGFloat tiemSliderValue;
@property (assign, nonatomic)BOOL * timeSwitchON;                     //开关的值
@property (strong, nonatomic)NSTimer * timer;                         //睡眠定时


//圣经本地
@property (nonatomic, strong)ShengJingMessageViewController * playShengVC;
@property (nonatomic, strong)FMDatabase *db;
@property (nonatomic, strong)NSMutableArray * dataJiuyueArr;            //旧约
@property (nonatomic, strong)NSMutableArray * dataXinyeuArr;            //新约
@property (nonatomic, strong)NSMutableArray * dataShengJingSongsArr;    //圣经歌曲
///圣经歌词
@property (nonatomic, strong)NSMutableString *mutableString;

@property (nonatomic, strong)NSMutableDictionary * dataShengJingLrcDic; //圣经歌词
@property (nonatomic, strong)NSMutableArray * timeArr;                  //圣经歌词时间
@property (nonatomic, strong)NSIndexPath * tempIndexPath;          //记录圣经
@property (nonatomic, assign)NSInteger btnTempTag;                 //圣经设置点击的btnTag 改变背景颜色

@property (nonatomic, strong)NSMutableDictionary * gaoLiangDic;    //圣经高亮状态

@property (nonatomic, strong)NSMutableArray * daogaoTitleArr;      //祷告词大全
@property (nonatomic, strong)NSMutableArray * daogaoMessageArr;    //祷告词

@property (nonatomic, strong)NSMutableDictionary * searchDic;      //搜索记录
@property (nonatomic, strong)NSMutableArray * searchShengJingArr;  //搜索出来的圣经歌词
@property (nonatomic, strong)SearchViewController * searchVC;      //搜索控制器
@property (nonatomic, strong) NSThread * thread;                   //搜索线程
@property (nonatomic, strong)NSString * searchStr;                 //搜索传的参数
@property (nonatomic, assign)BOOL searchBool;                      //搜索bool

@property (nonatomic, assign)BOOL isPlayShengJ;                    //是否开启圣经播放

//诗歌歌词
@property (strong, nonatomic)NSMutableDictionary * playGeCiDic;  //缓存歌词


//分享下载多功能标记
@property (nonatomic, strong)NSString * selectID;               //
@property (nonatomic, strong)UITableView * selectTab;           //
@property (nonatomic, strong)NSString * selectIndex;               //


//归档解档数据
@property (nonatomic, strong)NSMutableArray * paiHangArr;          //排行榜缓存数据
@property (nonatomic, strong)NSMutableArray * shige400Arr;         //诗歌400首缓存数据

+ (TheHomeManager *)shareTheHomeManager;

- (void)saveUserMessages;
- (void)getUserMessages;
- (void)clearUserMessages;

- (void)archiverMessage;                //归档
- (void)unArchiverMessage;              //解档

- (void)localShengJingSongMessage:(NSString *)selectID;
- (void)localShengJingLrc:(NSString *)selectID;

- (NSArray *)localDaoGaoCikuTitle;
- (NSArray *)localDaoGaoCikuMessage:(NSString *)selectId;

- (void)saveAllMusicAboutGeci;

//- (void)shareMusic;
- (void)searchShengJingLrc:(NSString *)searchStr;
@end
